<form class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true" method="post">
    <div class="layui-form-item">

        <div class="layui-form-item">
            <label class="layui-form-label">会员号</label>
            <div class="layui-input-block">
                <input type="text"  disabled="disabled"   value='{$vo.code}' class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">当前余额</label>
            <div class="layui-input-block">
                <input type="text" disabled="disabled"  value='{$vo.amount|fenToyuan|default="0"}' class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">充值金额</label>
            <div class="layui-input-block">
                    <blockquote class="layui-elem-quote">正数为充钱,负数为扣钱,单位 (元)</blockquote>
                <input type="text" name="amount" value='0' class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">充值原因</label>
            <div class="layui-input-block">
                <input type="text" name="rg_remark" value='' title="请填写充值原因" placeholder="请填写充值原因" class="layui-input">
            </div>
        </div>
    

        <div class="layui-form-item text-center">
            <input type='hidden' value='{$vo.id}' name='id'>
            <button class="layui-btn" id="submit" type='submit'>保存数据</button>
            <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
        </div>


</form>


<script type="text/javascript">
    $("#submit").click(
        function () {
            if(!$.isNumeric($("input[name='amount']").val())){
                layer.msg('请选择输入正确的充值金额', {icon: 2});
                return false;
            }
        }
    );
</script>